package com.bd.learning.excel;

import cn.hutool.core.util.StrUtil;
import lombok.Data;

import java.util.Objects;

@Data
public class BeanObj {

    private String type1;
    private String type2;
    private String packageName;
    private String fileName;
    private String methodName;
    private String methodNum;
    private String serverName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        BeanObj beanObj = (BeanObj) o;
        return StrUtil.nullToEmpty(packageName).equals(beanObj.packageName) && StrUtil.nullToEmpty(fileName).equals(beanObj.fileName) && StrUtil.nullToEmpty(methodName).equals(beanObj.methodName) ;
    }

    @Override
    public int hashCode() {
        return Objects.hash(StrUtil.nullToEmpty(packageName), StrUtil.nullToEmpty(fileName), StrUtil.nullToEmpty(methodName));
    }
}
